﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;

namespace CRM.GUI.QLHeThong
{
    public partial class frmManageCatalog : DevExpress.XtraEditors.XtraForm
    {
        public frmManageCatalog()
        {
            InitializeComponent();
            treeCatalog.ExpandAll();
        }



        private void treeCatalog_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e)
        {
            treeCatalog.ExpandAll();
            if (e.Node.Name == "nodeRegion")
            {
                panCatalog.Panel2.Controls.Clear();
                ucRegion uc = new ucRegion();
                uc.Width = panCatalog.Panel2.ClientSize.Width;
                uc.Height = panCatalog.Panel2.ClientSize.Height;
                panCatalog.Panel2.Controls.Add(uc);                
            }
            if (e.Node.Name == "nodeCollector")
            {
                panCatalog.Panel2.Controls.Clear();
                ucCollector uc = new ucCollector();
                uc.Width = panCatalog.Panel2.ClientSize.Width;
                uc.Height = panCatalog.Panel2.ClientSize.Height;
                panCatalog.Panel2.Controls.Add(uc);
            }
            if (e.Node.Name == "nodeResultSts")
            {
                panCatalog.Panel2.Controls.Clear();
                ucResultSts uc = new ucResultSts();
                uc.Width = panCatalog.Panel2.ClientSize.Width;
                uc.Height = panCatalog.Panel2.ClientSize.Height;
                panCatalog.Panel2.Controls.Add(uc);
            }
            if (e.Node.Name == "nodeSample")
            {
                panCatalog.Panel2.Controls.Clear();
                ucSample uc = new ucSample();
                uc.Width = panCatalog.Panel2.ClientSize.Width;
                uc.Height = panCatalog.Panel2.ClientSize.Height;
                panCatalog.Panel2.Controls.Add(uc);
            }
            if (e.Node.Name == "nodeBrand")
            {
                panCatalog.Panel2.Controls.Clear();
                ucBrand uc = new ucBrand();
                uc.Width = panCatalog.Panel2.ClientSize.Width;
                uc.Height = panCatalog.Panel2.ClientSize.Height;
                panCatalog.Panel2.Controls.Add(uc);
            }
        }
    }
}